package me.zhengjie.modules.website.repository;

import me.zhengjie.modules.website.domain.Theme;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.Optional;

/**
 * @author system
 * @since 2024-10-13 09:38:00
 *
 */
@Repository
public interface ThemeRepository extends JpaRepository<Theme, Long>, JpaSpecificationExecutor<Theme> {
    /**
     * 查询当前启用的主题
     *
     * @return 启用的主题
     */
    Optional<Theme> findByIsEnabledTrue();


    Theme findFirstByIsEnabledTrue();
}
